inherited frmSelectDebtor: TfrmSelectDebtor
  Left = 338
  Top = 210
  Caption = #1055#1086#1080#1089#1082' '#1075#1088#1072#1078#1076#1072#1085
  ClientHeight = 320
  OldCreateOrder = True
  ExplicitHeight = 358
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 279
    Height = 41
    ExplicitTop = 279
    ExplicitHeight = 41
    inherited BitBtn2: TBitBtn
      Left = 4
      Top = 3
      Width = 200
      Caption = #1042#1099#1073#1088#1072#1090#1100' '#1074#1099#1076#1077#1083#1077#1085#1085#1086#1075#1086
      ExplicitLeft = 4
      ExplicitTop = 3
      ExplicitWidth = 200
    end
    inherited BitBtn3: TBitBtn
      Left = 206
      Top = 3
      Width = 200
      Caption = #1054#1090#1082#1072#1079#1072#1090#1100#1089#1103' '#1080' '#1074#1099#1081#1090#1080
      ExplicitLeft = 206
      ExplicitTop = 3
      ExplicitWidth = 200
    end
    inherited BitBtn7: TBitBtn
      Left = 792
      Visible = False
      ExplicitLeft = 792
    end
  end
  object DBGridEh1: TDBGridEh [1]
    Left = 0
    Top = 54
    Width = 862
    Height = 225
    Align = alClient
    DataGrouping.GroupLevels = <>
    DataSource = dscSelectDebtor
    Flat = True
    FooterColor = clWindow
    FooterFont.Charset = DEFAULT_CHARSET
    FooterFont.Color = clWindowText
    FooterFont.Height = -11
    FooterFont.Name = 'MS Sans Serif'
    FooterFont.Style = []
    ImeMode = imDisable
    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
    RowDetailPanel.Color = clBtnFace
    RowHeight = 31
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    UseMultiTitle = True
    Columns = <
      item
        EditButtons = <>
        FieldName = 'ID'
        Footers = <>
        Visible = False
        Width = 30
      end
      item
        EditButtons = <>
        FieldName = 'NAME'
        Footers = <>
        Width = 195
      end
      item
        EditButtons = <>
        FieldName = 'BIRTH_DATE'
        Footers = <>
      end
      item
        EditButtons = <>
        FieldName = 'STREET'
        Footers = <>
        Width = 118
      end
      item
        EditButtons = <>
        FieldName = 'HOUSE'
        Footers = <>
        Width = 28
      end
      item
        EditButtons = <>
        FieldName = 'APPARTS'
        Footers = <>
        Width = 25
      end
      item
        EditButtons = <>
        FieldName = 'DT_CNT'
        Footers = <>
        Width = 47
      end
      item
        EditButtons = <>
        FieldName = 'DT_SUMMA'
        Footers = <>
      end
      item
        EditButtons = <>
        FieldName = 'NOTES'
        Footers = <>
        Width = 235
      end>
    object RowDetailData: TRowDetailPanelControlEh
    end
  end
  object Panel3: TPanel [2]
    Left = 0
    Top = 0
    Width = 862
    Height = 30
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 2
    object Label1: TLabel
      Left = 10
      Top = 10
      Width = 94
      Height = 13
      Caption = #1055#1086#1076#1089#1090#1088#1086#1082#1072' '#1087#1086#1080#1089#1082#1072
    end
    object SpeedButton1: TSpeedButton
      Left = 316
      Top = 6
      Width = 63
      Height = 22
      Action = aSearch
      Flat = True
      Glyph.Data = {
        36040000424D3604000000000000360000002800000010000000100000000100
        2000000000000004000000000000000000000000000000000000FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FEFEFE006A6A6A0062626200FAFAFA00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FEFEFE003F404000343434002A2A2A00A4A4A400FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FEFE
        FE00414242003D3D3D00373737005C5C5C00C1C1C100FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FEFEFE00FF00FF00FF00FF00FEFEFE003535
        35003030300034343400898989006B6B6B00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00C3C3C300A0A0A000B8B8B800B6B6B5009B9B9B00E9E9E9002F2F
        2F00232323008383830065656500FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF0090909000E2E2E200D7D7D700B3B3B200BAB9B800DFDFDF00D3D3D300AAAA
        AA002E2E2E005E5E5E00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00CFCF
        CF00D9D9D900B7B6B500DBD6CD00E1DDD600E4DFD800D9D5CC00C1C1C100CFCF
        CF00F9F9F900FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00B3B3
        B300C2C2C200D0CDC700DAD7D100E0DDD700E4E1DB00E7E4DE00D1CDC600D5D5
        D500AEAEAE00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00BFBF
        BF00BFBEBD00E4E2DE00D5D2CE00D9D7D200DEDBD600E4E1DC00E1DED800BABA
        BA00A1A1A100FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00C7C7
        C700BBBBBB00ECECEA00F5F4F200E0DFDD00DBDAD700DEDCD900DEDCD900B5B5
        B500A6A6A600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00B8B8
        B800BABABA00DCDCD900EDECEB00F2F1F000F1F0EE00E9E8E600D5D4D200D5D5
        D500B6B6B600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00E3E3
        E300EDEDED00BFBFBF00D5D5D400DEDEDD00DDDDDC00D4D4D300ADADAD00DFDF
        DF00F6F6F600FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FEFE
        FE00C8C8C800F4F4F400C0C0C000BCBCBC00BBBBBB00C9C9C900EBEBEB00BDBD
        BD00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FEFEFE00E5E5E500C5C5C500DCDCDC00DADADA00B9B9B900E5E5E500FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
    end
    object eFIO: TDBEditEh
      Left = 108
      Top = 8
      Width = 207
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Flat = True
      ShowHint = True
      TabOrder = 0
      Visible = True
    end
  end
  object ToolBar3: TToolBar [3]
    Left = 0
    Top = 30
    Width = 862
    Height = 24
    Caption = 'ToolBar1'
    Images = MainForm.ImageList2
    TabOrder = 3
    object ToolButton5: TToolButton
      Left = 0
      Top = 0
      Action = aDebtorAdd
    end
    object ToolButton6: TToolButton
      Left = 23
      Top = 0
      Action = aDebtorEdit
    end
  end
  inherited PropStorageEh1: TPropStorageEh
    Section = 'frmSelectDebtor'
    Left = 488
  end
  object dsSelectDebtor: TpFIBDataSet
    SelectSQL.Strings = (
      'select'
      '    dr.id,'
      '    dr.name,'
      '    dr.birth_date,'
      '    dr.street,'
      '    dr.house,'
      '    dr.apparts,'
      '    dr.notes,'
      '    dr.phone_home,'
      '    dr.phone_cell,'
      '    (select count(1)'
      '        from rst_debts dt where dt.debtor_id = dr.id'
      '          and dt.closed = 0 and dt.is_deleted = 0) as dt_cnt,'
      '    (select sum(dt.summa_cur)'
      '        from rst_debts dt where dt.debtor_id = dr.id'
      '          and dt.closed = 0 and dt.is_deleted = 0) as dt_summa'
      'from'
      '    rst_debtors dr'
      'where dr.NAME starting rupper(trim(:name))'
      '  and dr.is_deleted <> 1')
    Transaction = MAINDM.MainTransaction
    Database = MAINDM.MainDB
    Left = 38
    Top = 132
    object dsSelectDebtorID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsSelectDebtorNAME: TFIBStringField
      DisplayLabel = #1060#1048#1054
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsSelectDebtorBIRTH_DATE: TFIBDateField
      DisplayLabel = #1044#1072#1090#1072' '#1088#1086#1078#1076'.'
      FieldName = 'BIRTH_DATE'
      DisplayFormat = 'dd.mm.yyyy'
    end
    object dsSelectDebtorSTREET: TFIBStringField
      DisplayLabel = #1059#1083#1080#1094#1072
      FieldName = 'STREET'
      Size = 60
      EmptyStrToNull = True
    end
    object dsSelectDebtorHOUSE: TFIBStringField
      DisplayLabel = #1044#1086#1084
      FieldName = 'HOUSE'
      Size = 16
      EmptyStrToNull = True
    end
    object dsSelectDebtorAPPARTS: TFIBStringField
      DisplayLabel = #1050#1074'.'
      FieldName = 'APPARTS'
      Size = 16
      EmptyStrToNull = True
    end
    object dsSelectDebtorNOTES: TFIBStringField
      DisplayLabel = #1047#1072#1084#1077#1090#1082#1080
      FieldName = 'NOTES'
      Size = 255
      EmptyStrToNull = True
    end
    object dsSelectDebtorPHONE_HOME: TFIBStringField
      FieldName = 'PHONE_HOME'
      Size = 16
      EmptyStrToNull = True
    end
    object dsSelectDebtorPHONE_CELL: TFIBStringField
      FieldName = 'PHONE_CELL'
      Size = 16
      EmptyStrToNull = True
    end
    object dsSelectDebtorDT_CNT: TFIBIntegerField
      DisplayLabel = #1044#1086#1083#1075#1086#1074'|'#1050#1086#1083'-'#1074#1086
      FieldName = 'DT_CNT'
    end
    object dsSelectDebtorDT_SUMMA: TFIBBCDField
      DisplayLabel = #1044#1086#1083#1075#1086#1074'|'#1053#1072' '#1089#1091#1084#1084#1091
      FieldName = 'DT_SUMMA'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
  end
  object dscSelectDebtor: TDataSource
    DataSet = dsSelectDebtor
    Left = 68
    Top = 132
  end
  object ActionList2: TActionList
    Images = MainForm.ImageList2
    Left = 575
    Top = 9
    object aDebtorAdd: TAction
      Caption = #1044#1086#1073#1072#1074#1080#1090#1100' '#1085#1086#1074#1086#1075#1086
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100' '#1085#1086#1074#1086#1075#1086' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
      ImageIndex = 1
      OnExecute = aDebtorAddExecute
    end
    object aDebtorEdit: TAction
      Caption = #1048#1079#1084#1077#1085#1080#1090#1100' '#1074#1099#1073#1088#1072#1085#1085#1086#1075#1086
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100' '#1074#1099#1073#1088#1072#1085#1085#1086#1075#1086' '#1074' '#1090#1072#1073#1083#1080#1094#1077' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072
      ImageIndex = 3
      OnExecute = aDebtorEditExecute
    end
    object aSearch: TAction
      Caption = #1055#1086#1080#1089#1082
      Hint = #1055#1086#1080#1089#1082' '#1075#1088#1072#1078#1076#1072#1085#1080#1085#1072', '#1074' '#1060#1048#1054' '#1082#1086#1090#1086#1088#1086#1075#1086' '#1089#1086#1076#1077#1088#1078#1080#1090#1089#1103' '#1091#1082#1072#1079#1072#1085#1085#1072#1103' '#1087#1086#1076#1089#1090#1088#1086#1082#1072
      ImageIndex = 4
      OnExecute = aSearchExecute
    end
  end
end
